#include "SMPPSourceTelematicsId.hpp"

using namespace smpp::pdu;

SourceTelematicsId::SourceTelematicsId(const quint8 nValue):
TLV(TLVtags::TAG_SOURCE_TELEMATICS_ID,1),_Value(nValue){}

SourceTelematicsId::SourceTelematicsId(
const SourceTelematicsId &nSourceTelematicsId):
TLV(nSourceTelematicsId),_Value(nSourceTelematicsId.getValue()){}

bool SourceTelematicsId::operator ==(
	const SourceTelematicsId &nSourceTelematicsId) const{
	return (TLV::operator == (nSourceTelematicsId) && 
			_Value == nSourceTelematicsId.getValue());
}

bool SourceTelematicsId::operator !=(
	const SourceTelematicsId &nSourceTelematicsId) const{
	return !this->operator == (nSourceTelematicsId);
}

SourceTelematicsId &SourceTelematicsId::operator = (
	const SourceTelematicsId &nSourceTelematicsId){
	if(*this == nSourceTelematicsId)
		return *this;
	TLV::operator = (nSourceTelematicsId);
	_Value = nSourceTelematicsId.getValue();
	return *this;
}

void SourceTelematicsId::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 SourceTelematicsId::getValue() const{
	return _Value;
}
